"""
Webhook相关的数据模型
"""

from pydantic import BaseModel
from typing import Dict, Any, Optional


class WebhookEvent(BaseModel):
    """Webhook事件模型"""
    id: str
    object: str
    api_version: str
    created: int
    data: Dict[str, Any]
    livemode: bool
    pending_webhooks: int
    request: Optional[Dict[str, Any]] = None
    type: str


class WebhookResponse(BaseModel):
    """Webhook响应模型"""
    status: str
    message: str
    event_id: str
    event_type: str
    event_created_time: Optional[int] = None


class WebhookConfig(BaseModel):
    """Webhook配置模型"""
    endpoint_secret: str
    enabled_events: list[str]
    url: str
    description: Optional[str] = None
